import platform

import falcon
import psutil
import os
import time
import json
from datetime import datetime, timedelta

from WebBackend.interface.management.Dashboard.func.disk_list import get_disk_list
from WebBackend.middleware.virtualWorldGate_Chuche import login_require


@falcon.before(login_require)
class DiskInfoAPI:
    async def on_get(self, req: falcon.Request, resp: falcon.Response):
        resp.media = get_disk_list()
